﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UsersMaster.master" AutoEventWireup="true"
    CodeBehind="ItemsTransaction.aspx.cs" Inherits="SMS.Items.ItemsTransaction" %>

<asp:Content ID="Content1" ContentPlaceHolderID="UserHeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="UserMainContent" runat="server">
    <div id="search" class="boxed">
        <h2 class="title" dir="rtl">
            <img src="../App_Themes/Theme/images/Search 2.png" class="img" />
            بحث</h2>
        <div dir="rtl" class="content">
            <table dir="rtl">
                <tr>
                    <td align="right">
                        <asp:Label ID="Label1" Text="الباركود:" runat="server" />
                    </td>
                    <td align="right">
                        <asp:TextBox ID="txtBarcode" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="Label2" Text="النوع:" runat="server" />
                    </td>
                    <td align="right">
                        <asp:DropDownList Width="100%" AppendDataBoundItems="true" runat="server" ID="drpStockType">
                            <asp:ListItem Text="الجميع" Value="-1" />
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label3" runat="server" Text="من :"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:TextBox ID="txtDateFrom" runat="server" />
                        <ajax:CalendarExtender ID="CalendarExtender1" Animated="true" TargetControlID="txtDateFrom"
                            runat="server">
                        </ajax:CalendarExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label4" runat="server" Text="إلى :"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:TextBox ID="txtDateTo" runat="server" />
                        <ajax:CalendarExtender ID="CalendarExtender2" Animated="true" TargetControlID="txtDateTo"
                            runat="server">
                        </ajax:CalendarExtender>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="left">
                        <asp:Button ID="btnSearch" Text="بحث" runat="server" OnClick="btnSearch_Click" />
                    </td>
                </tr>
            </table>
            <table width="100%">
                <tr>
                    <td align="right">
                        <asp:GridView ID="GridView1" CssClass="Grid" DataKeyNames="ID" PagerStyle-CssClass="Pager"
                            HeaderStyle-Wrap="true" PageIndex="0" PagerSettings-Mode="NumericFirstLast" AllowPaging="true"
                            PageSize="5" runat="server" AutoGenerateColumns="False" Width="90%" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
                            OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound"
                            OnPageIndexChanging="GridView1_PageIndexChanging">
                            <PagerStyle HorizontalAlign="Center" />
                            <Columns>
                                <asp:TemplateField HeaderText="اسم المنتج">
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem,"Item.Name") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="المخزن">
                                    <ItemTemplate>
                                        <%#DataBinder.Eval(Container.DataItem,"Stock.Name") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="OrderID" HeaderText="رقم الايصال" />
                                <asp:BoundField DataField="Sell" HeaderText="بيع" />
                                <asp:BoundField DataField="Buy" HeaderText="شراء" />
                                <asp:BoundField DataField="Date" HeaderText="التاريخ" />
                                <asp:TemplateField HeaderText="العامل">
                                    <ItemTemplate>
                                        <%#DataBinder.Eval(Container.DataItem,"User.Name") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="AmountInStock" HeaderText="القيمة في المخزن" />
                            </Columns>
                            <EmptyDataTemplate>
                                No Results Found
                            </EmptyDataTemplate>
                            <EmptyDataRowStyle HorizontalAlign="Justify" Width="100%" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
